CREATE TABLE [dbo].[TTAMAR_ANIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTAMAR_AN__NU_PR__29820FAE] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTAMAR_AN__CO_US__2A7633E7] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTAMAR_AN__FE_US__2B6A5820] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTAMAR_AN__CO_US__2C5E7C59] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTAMAR_AN__FE_US__2D52A092] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTAMAR_ANIN] ADD CONSTRAINT [PK__TTAMAR_A__DB895B8033D580EF] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_AMAR], [CO_UNID_CONC], [FE_AMAR], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTAMAR_ANIN] ADD CONSTRAINT [FK__TTAMAR_ANIN__2B60367F] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TTAMAR_ANTA] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
